<?php
include 'partials/header.php';
require __DIR__ . '/notes/notes.php';

if (!isset($_GET['id'])) {
    include "partials/not_found.php";
    exit;
}
$noteId = $_GET['id'];

$note = getnoteById($noteId);
if (!$note) {
    include "partials/not_found.php";
    exit;
}

?>
<div class="container">
    <div class="card">
        <div class="card-header">
            <h3>View Note: <b><?php echo $note['name'] ?></b></h3>
        </div>
        <div class="card-body">
        <?php echo $note['value'] ?>
        </div>
    </div>
</div>


<?php include 'partials/footer.php' ?>